package com.ymx.quanjuhe.action;

import com.ymx.quanjuhe.bean.VisitLog;
import com.ymx.quanjuhe.bean.VisitLogExample;
import com.ymx.quanjuhe.dao.VisitLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;

import static org.springframework.http.HttpHeaders.USER_AGENT;

@Controller
public class LoginController {
    @Resource
    VisitLogMapper visitLogMapper;

    @RequestMapping("/login")
    public String faceLoginIn(){
        return "login";
    }

    @RequestMapping("/test")
    @ResponseBody
    public List<VisitLog> in(){
        List<VisitLog> visitLogs = visitLogMapper.selectByExample(new VisitLogExample());
        return visitLogs;
    }
}
